1. Field of the Invention
The present invention relates to a defect detection apparatus, a defect detection method and a computer program, which are capable of setting a reference line with respect to a plurality of edge points having connectivity, to accurately detect a defect such as a burr or a crack based upon a difference of each edge point from the reference line.
2. Description of the Related Art
Conventionally, in a case of detecting the presence of a defect such as a burr or a crack from an picked-up image, for example as for an object having an edge in curved shape, a plurality of edge points are acquired at fixed intervals or fixed angles along the edge, to calculate a free curve enveloping an acquired edge-point sequence. Subsequently, a difference between the calculated free curve and each of the acquired edge points is obtained, and a characteristic amount such as a width, a height, and an area of the defect is obtained, to determine the presence or absence of a burr, a crack or the like.
For example, Japanese Patent Application Laid-Open No. 2001-175865 discloses an image processing method in which a teaching image having been registered in advance and a picked-up image are compared with each other to determine, by use of a difference value obtained by multiplication by deviation data of each pixel, that a portion larger than a prescribed threshold is a defect. Further, Japanese Patent Application Laid-Open No. 2000-055827 discloses a method for inspecting an opening of a glass container or the like, in which a portion with a differential value larger than a prescribed value is determined as a defect based upon differential information of a projection signal.
Further, Japanese Patent Application Laid-Open Nos. 2001-317927 and 2003-311464 disclose inspection methods in which an approximate straight line (Japanese Unexamined Patent Publication No. 2001-317927) or an approximate circle (Japanese Unexamined Patent Publication No. 2003-311464) is calculated by making regression analysis on an edge-point sequence, to detect the presence of a defect based upon a difference from the calculated approximate straight line or the approximate circle.